/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.util.ArrayList;
import javax.swing.JFrame;
import javax.swing.JPanel;

/**
 *
 * @author Comedy Option
 */
public class EmpFacingView extends JFrame{
    Building model;
    BuildingView modelView;
    EmpLeftSide leftPanel;
    public final int NUM_FLOORS = 2;
    RoomView selectedRoom;
    public static EmpFacingView view = new EmpFacingView();

    public EmpFacingView(){
        model = new Building(NUM_FLOORS);
        layoutGUI();
    }
    
    private void layoutGUI(){
        this.setLayout(new BorderLayout());
        this.setExtendedState(MAXIMIZED_BOTH);
        leftPanel = new EmpLeftSide();
        this.add(leftPanel, BorderLayout.WEST);
        BuildingView view = new BuildingView(model);
        this.add(view, BorderLayout.CENTER);
        CardLayout cl = (CardLayout)(view.getLayout());

        cl.show(view, "1");
        view.addRoom("1", "100", 40.95, 2, 0, 100, 100, 100);
        view.addRoom("1", "101", 20.00, 1, 0, 200, 100, 100);
        view.addRoom("1", "102", 20.00, 1, 0, 300, 100, 100);
        view.addRoom("1", "103", 20.00, 1, 100, 400, 100, 100);
        view.addRoom("1", "104", 20.00, 1, 200, 400, 100, 100);
        view.addRoom("1", "105", 20.00, 1, 300, 400, 100, 100);
        view.addRoom("1", "106", 20.00, 1, 400, 400, 100, 100);
        view.addRoom("1", "107", 20.00, 1, 500, 400, 100, 100);
        view.addRoom("1", "108", 20.00, 1, 600, 400, 100, 100);
        view.addRoom("1", "109", 20.00, 1, 700, 400, 100, 100);
        view.addRoom("1", "110", 20.00, 1, 800, 300, 100, 100);
        view.addRoom("1", "111", 20.00, 1, 800, 200, 100, 100);
        view.addRoom("1", "112", 20.00, 1, 800, 100, 100, 100);
        view.addRoom("1", "Presidential Suite", 20.00, 1, 200, 100, 500, 150);
        view.addRoom("2", "P", 28.00, 3, 5,5, 100, 300);
        this.setTitle("Employee Facing Hotel Registry");
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }
    
    public static EmpFacingView getView(){
        return view;
    }
            
   
}
